/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package GUI;

/**
 *
 * @author CHX_93
 */
public class Gui_GhiDanh_1 extends javax.swing.JPanel {

    /**
     * Creates new form Gui_GhiDanh_1
     */
    public Gui_GhiDanh_1() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        panel_guiThenKH_TTC = new javax.swing.JPanel();
        lb_guiThenKH_hoTen = new javax.swing.JLabel();
        lb_guiThenKH_gioiTinh = new javax.swing.JLabel();
        txt_guiThenKH_hoTen_tt = new javax.swing.JTextField();
        cbo_guiThenKH_gioiTinh_tt = new javax.swing.JComboBox();
        lb_guiThenKH_ngaySinh = new javax.swing.JLabel();
        txt_guiThenKH_ngaySinh_tt = new javax.swing.JTextField();
        btn_guiThemKH_OK1 = new javax.swing.JButton();
        panel_guiThenKH_TTCT = new javax.swing.JPanel();
        lb_guiThenKH_diaChi = new javax.swing.JLabel();
        lb_guiThenKH_sdt = new javax.swing.JLabel();
        lb_guiThenKH_tinhTrang = new javax.swing.JLabel();
        txt_guiThenKH_diaChi_tt = new javax.swing.JTextField();
        cbo_guiThenKH_tinhTrang_tt = new javax.swing.JComboBox();
        txt_guiThenKH_sdt_tt = new javax.swing.JTextField();
        btn_guiThemKH_OK2 = new javax.swing.JButton();

        setBorder(javax.swing.BorderFactory.createTitledBorder("Thêm khách hàng"));
        setPreferredSize(new java.awt.Dimension(700, 400));

        panel_guiThenKH_TTC.setBorder(javax.swing.BorderFactory.createTitledBorder("Thông tin chung"));

        lb_guiThenKH_hoTen.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lb_guiThenKH_hoTen.setText("Họ tên:");
        lb_guiThenKH_hoTen.setName("lbName"); // NOI18N

        lb_guiThenKH_gioiTinh.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lb_guiThenKH_gioiTinh.setText("Giới tính:");
        lb_guiThenKH_gioiTinh.setName("lbGender"); // NOI18N

        txt_guiThenKH_hoTen_tt.setHorizontalAlignment(javax.swing.JTextField.LEFT);
        txt_guiThenKH_hoTen_tt.setName("txtName"); // NOI18N
        txt_guiThenKH_hoTen_tt.addInputMethodListener(new java.awt.event.InputMethodListener() {
            public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) {
                txt_guiThenKH_hoTen_ttInputMethodTextChanged(evt);
            }
            public void caretPositionChanged(java.awt.event.InputMethodEvent evt) {
            }
        });
        txt_guiThenKH_hoTen_tt.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txt_guiThenKH_hoTen_ttKeyTyped(evt);
            }
        });

        cbo_guiThenKH_gioiTinh_tt.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Nam", "Nữ" }));
        cbo_guiThenKH_gioiTinh_tt.setName("cboGender"); // NOI18N

        lb_guiThenKH_ngaySinh.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lb_guiThenKH_ngaySinh.setText("Ngày sinh:");
        lb_guiThenKH_ngaySinh.setName("lbBird"); // NOI18N

        txt_guiThenKH_ngaySinh_tt.setHorizontalAlignment(javax.swing.JTextField.LEFT);
        txt_guiThenKH_ngaySinh_tt.setName("txtName"); // NOI18N
        txt_guiThenKH_ngaySinh_tt.addInputMethodListener(new java.awt.event.InputMethodListener() {
            public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) {
                txt_guiThenKH_ngaySinh_ttInputMethodTextChanged(evt);
            }
            public void caretPositionChanged(java.awt.event.InputMethodEvent evt) {
            }
        });
        txt_guiThenKH_ngaySinh_tt.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txt_guiThenKH_ngaySinh_ttKeyTyped(evt);
            }
        });

        btn_guiThemKH_OK1.setText("OK");
        btn_guiThemKH_OK1.setName("btnOk"); // NOI18N

        javax.swing.GroupLayout panel_guiThenKH_TTCLayout = new javax.swing.GroupLayout(panel_guiThenKH_TTC);
        panel_guiThenKH_TTC.setLayout(panel_guiThenKH_TTCLayout);
        panel_guiThenKH_TTCLayout.setHorizontalGroup(
            panel_guiThenKH_TTCLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panel_guiThenKH_TTCLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lb_guiThenKH_gioiTinh)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panel_guiThenKH_TTCLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(txt_guiThenKH_hoTen_tt)
                    .addComponent(cbo_guiThenKH_gioiTinh_tt, 0, 139, Short.MAX_VALUE))
                .addGap(12, 12, 12)
                .addGroup(panel_guiThenKH_TTCLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(panel_guiThenKH_TTCLayout.createSequentialGroup()
                        .addComponent(lb_guiThenKH_ngaySinh)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txt_guiThenKH_ngaySinh_tt, javax.swing.GroupLayout.DEFAULT_SIZE, 98, Short.MAX_VALUE))
                    .addComponent(btn_guiThemKH_OK1))
                .addContainerGap())
            .addGroup(panel_guiThenKH_TTCLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panel_guiThenKH_TTCLayout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(lb_guiThenKH_hoTen)
                    .addContainerGap(393, Short.MAX_VALUE)))
        );
        panel_guiThenKH_TTCLayout.setVerticalGroup(
            panel_guiThenKH_TTCLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panel_guiThenKH_TTCLayout.createSequentialGroup()
                .addGap(9, 9, 9)
                .addGroup(panel_guiThenKH_TTCLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txt_guiThenKH_ngaySinh_tt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lb_guiThenKH_ngaySinh)
                    .addComponent(txt_guiThenKH_hoTen_tt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panel_guiThenKH_TTCLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lb_guiThenKH_gioiTinh)
                    .addComponent(cbo_guiThenKH_gioiTinh_tt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btn_guiThemKH_OK1))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(panel_guiThenKH_TTCLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panel_guiThenKH_TTCLayout.createSequentialGroup()
                    .addGap(13, 13, 13)
                    .addComponent(lb_guiThenKH_hoTen)
                    .addContainerGap(42, Short.MAX_VALUE)))
        );

        panel_guiThenKH_TTCT.setBorder(javax.swing.BorderFactory.createTitledBorder("Thông tin chi tiết"));

        lb_guiThenKH_diaChi.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lb_guiThenKH_diaChi.setText("Địa chỉ:");
        lb_guiThenKH_diaChi.setName("lbName"); // NOI18N

        lb_guiThenKH_sdt.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lb_guiThenKH_sdt.setText("Số đt:");
        lb_guiThenKH_sdt.setName("lbName"); // NOI18N

        lb_guiThenKH_tinhTrang.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lb_guiThenKH_tinhTrang.setText("Tình trạng:");
        lb_guiThenKH_tinhTrang.setName("lbGender"); // NOI18N

        txt_guiThenKH_diaChi_tt.setHorizontalAlignment(javax.swing.JTextField.LEFT);
        txt_guiThenKH_diaChi_tt.setName("txtName"); // NOI18N
        txt_guiThenKH_diaChi_tt.addInputMethodListener(new java.awt.event.InputMethodListener() {
            public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) {
                txt_guiThenKH_diaChi_ttInputMethodTextChanged(evt);
            }
            public void caretPositionChanged(java.awt.event.InputMethodEvent evt) {
            }
        });
        txt_guiThenKH_diaChi_tt.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txt_guiThenKH_diaChi_ttKeyTyped(evt);
            }
        });

        cbo_guiThenKH_tinhTrang_tt.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Cũ", "Mới" }));
        cbo_guiThenKH_tinhTrang_tt.setName("cboGender"); // NOI18N

        txt_guiThenKH_sdt_tt.setHorizontalAlignment(javax.swing.JTextField.LEFT);
        txt_guiThenKH_sdt_tt.setName("txtName"); // NOI18N
        txt_guiThenKH_sdt_tt.addInputMethodListener(new java.awt.event.InputMethodListener() {
            public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) {
                txt_guiThenKH_sdt_ttInputMethodTextChanged(evt);
            }
            public void caretPositionChanged(java.awt.event.InputMethodEvent evt) {
            }
        });
        txt_guiThenKH_sdt_tt.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txt_guiThenKH_sdt_ttKeyTyped(evt);
            }
        });

        javax.swing.GroupLayout panel_guiThenKH_TTCTLayout = new javax.swing.GroupLayout(panel_guiThenKH_TTCT);
        panel_guiThenKH_TTCT.setLayout(panel_guiThenKH_TTCTLayout);
        panel_guiThenKH_TTCTLayout.setHorizontalGroup(
            panel_guiThenKH_TTCTLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panel_guiThenKH_TTCTLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panel_guiThenKH_TTCTLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panel_guiThenKH_TTCTLayout.createSequentialGroup()
                        .addComponent(lb_guiThenKH_tinhTrang)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cbo_guiThenKH_tinhTrang_tt, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(panel_guiThenKH_TTCTLayout.createSequentialGroup()
                        .addComponent(lb_guiThenKH_diaChi)
                        .addGap(18, 18, 18)
                        .addComponent(txt_guiThenKH_diaChi_tt)))
                .addGap(30, 30, 30)
                .addComponent(lb_guiThenKH_sdt)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(txt_guiThenKH_sdt_tt)
                .addContainerGap())
        );
        panel_guiThenKH_TTCTLayout.setVerticalGroup(
            panel_guiThenKH_TTCTLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panel_guiThenKH_TTCTLayout.createSequentialGroup()
                .addGroup(panel_guiThenKH_TTCTLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lb_guiThenKH_diaChi)
                    .addComponent(txt_guiThenKH_diaChi_tt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txt_guiThenKH_sdt_tt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lb_guiThenKH_sdt))
                .addGap(11, 11, 11)
                .addGroup(panel_guiThenKH_TTCTLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lb_guiThenKH_tinhTrang)
                    .addComponent(cbo_guiThenKH_tinhTrang_tt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        btn_guiThemKH_OK2.setText("OK");
        btn_guiThemKH_OK2.setName("btnOk"); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btn_guiThemKH_OK2)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(panel_guiThenKH_TTCT, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(panel_guiThenKH_TTC, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(4, 4, 4)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(panel_guiThenKH_TTC, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panel_guiThenKH_TTCT, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btn_guiThemKH_OK2))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void txt_guiThenKH_diaChi_ttInputMethodTextChanged(java.awt.event.InputMethodEvent evt) {//GEN-FIRST:event_txt_guiThenKH_diaChi_ttInputMethodTextChanged
        // TODO add your handling code here:
    }//GEN-LAST:event_txt_guiThenKH_diaChi_ttInputMethodTextChanged

    private void txt_guiThenKH_diaChi_ttKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txt_guiThenKH_diaChi_ttKeyTyped
        // TODO add your handling code here:
    }//GEN-LAST:event_txt_guiThenKH_diaChi_ttKeyTyped

    private void txt_guiThenKH_sdt_ttInputMethodTextChanged(java.awt.event.InputMethodEvent evt) {//GEN-FIRST:event_txt_guiThenKH_sdt_ttInputMethodTextChanged
        // TODO add your handling code here:
    }//GEN-LAST:event_txt_guiThenKH_sdt_ttInputMethodTextChanged

    private void txt_guiThenKH_sdt_ttKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txt_guiThenKH_sdt_ttKeyTyped
        // TODO add your handling code here:
    }//GEN-LAST:event_txt_guiThenKH_sdt_ttKeyTyped

    private void txt_guiThenKH_ngaySinh_ttKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txt_guiThenKH_ngaySinh_ttKeyTyped
        // TODO add your handling code here:
    }//GEN-LAST:event_txt_guiThenKH_ngaySinh_ttKeyTyped

    private void txt_guiThenKH_ngaySinh_ttInputMethodTextChanged(java.awt.event.InputMethodEvent evt) {//GEN-FIRST:event_txt_guiThenKH_ngaySinh_ttInputMethodTextChanged
        // TODO add your handling code here:
    }//GEN-LAST:event_txt_guiThenKH_ngaySinh_ttInputMethodTextChanged

    private void txt_guiThenKH_hoTen_ttKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txt_guiThenKH_hoTen_ttKeyTyped
         if(Character.isDigit(evt.getKeyChar()))
        {
            evt.consume();
        }
        if(!UIFormat.validStringLengthMax(txt_guiThenKH_hoTen_tt.getText(), MyConst.MaxStringLength)){
            evt.consume();
        }
    }//GEN-LAST:event_txt_guiThenKH_hoTen_ttKeyTyped

    private void txt_guiThenKH_hoTen_ttInputMethodTextChanged(java.awt.event.InputMethodEvent evt) {//GEN-FIRST:event_txt_guiThenKH_hoTen_ttInputMethodTextChanged
        // TODO add your handling code here:
    }//GEN-LAST:event_txt_guiThenKH_hoTen_ttInputMethodTextChanged


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btn_guiThemKH_OK1;
    private javax.swing.JButton btn_guiThemKH_OK2;
    private javax.swing.JComboBox cbo_guiThenKH_gioiTinh_tt;
    private javax.swing.JComboBox cbo_guiThenKH_tinhTrang_tt;
    private javax.swing.JLabel lb_guiThenKH_diaChi;
    private javax.swing.JLabel lb_guiThenKH_gioiTinh;
    private javax.swing.JLabel lb_guiThenKH_hoTen;
    private javax.swing.JLabel lb_guiThenKH_ngaySinh;
    private javax.swing.JLabel lb_guiThenKH_sdt;
    private javax.swing.JLabel lb_guiThenKH_tinhTrang;
    private javax.swing.JPanel panel_guiThenKH_TTC;
    private javax.swing.JPanel panel_guiThenKH_TTCT;
    private javax.swing.JTextField txt_guiThenKH_diaChi_tt;
    private javax.swing.JTextField txt_guiThenKH_hoTen_tt;
    private javax.swing.JTextField txt_guiThenKH_ngaySinh_tt;
    private javax.swing.JTextField txt_guiThenKH_sdt_tt;
    // End of variables declaration//GEN-END:variables
}
